<?php
namespace app\workerman;

use app\model\User;
use think\worker\Server;

class Worker extends Server
{
    protected $socket = 'websocket://0.0.0.0:2348';
    public function onMessage($connection, $data){
//        $connection->send(json_encode($data));
//        $user = User::find(2);
        $connection->send($data);
    }
}